package com.example.demo01.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @Description
 * @Author hzq
 * @Date 2020-04-27
 * @Project demo01
 */
@Controller
@RequestMapping(value = "/index")
public class IndexController {

    @RequestMapping(value="/toIndex")
    public String toIndex(Model model){
        model.addAttribute("msg", "hello, world!!!");
        return "index";
    }
}
